package cn.cdeden.system.domain.dto;

//import io.swagger.annotations.ApiModelProperty;
import cn.cdeden.system.domain.FilesLabel;
import io.github.linpeilie.annotations.AutoMapper;
import io.github.linpeilie.annotations.AutoMappers;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.*;
import lombok.experimental.Accessors;

//import javax.validation.constraints.NotBlank;
//import javax.validation.constraints.NotEmpty;
//import javax.validation.constraints.NotNull;
//import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
* @author Yu.
* @date 2022-10-21
*/
@Data
@Builder
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@AutoMappers({@AutoMapper(target = FilesLabel.class)})
public class FilesLabelDto implements Serializable {
    private static final long serialVersionUID = 1L;

    private Long id;

//    @ApiModelProperty(value = "标签名")
    @Pattern(regexp = "^.{0,50}$", message = "标签名最长为50个字符")
    @NotNull(message = "缺少必要的参数规则name")
    @NotBlank(message = "标签名不能为null，或者只包含空格")
    @NotEmpty(message = "标签名不能为null或者长度为0")
    private String labelName;

//    @ApiModelProperty(value = "父级编号")
    private Long parentId = 0L;

//    @ApiModelProperty(value = "父级名称")
    private String parentName;

//    @ApiModelProperty(value = "团队编号")
    private String teamId;


//    @ApiModelProperty(value = "标签类型")
    private String labelType;


//    @ApiModelProperty(value = "图标")
    private String icon;
//    @ApiModelProperty(value = "图标颜色")

    @Pattern(regexp = "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", message = "不是标准的颜色格式")
    private String iconColor;

//    @ApiModelProperty(value = "排序")
    private Integer sort;

//    @ApiModelProperty(value = "儿子数据")
    private List<FilesLabelDto>  children = new ArrayList<>();

//    @ApiModelProperty(value = "拥有者编号")
    private String createId;

//    @ApiModelProperty(value = "创建者")
    private String createBy;

//    @ApiModelProperty(value = "创建日期")
    private Date createTime;

//    @ApiModelProperty(value = "更新编号")
    private String updateId;

//    @ApiModelProperty(value = "更新者")
    private String updateBy;

//    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    private String libraryId;
}
